package com.woniu.config;

import com.woniu.service.ChatService;
import org.springframework.ai.chat.client.ChatClient;
import org.springframework.ai.tool.ToolCallbackProvider;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.client.RestClient;

/**
 * @Author: 朱杰
 * @Description: AI工具回调配置类
 * @DateTime: 2025/6/10 10:36
 **/
@Configuration
public class AiToolConfig {
    @Bean
    public ChatService chatService(ChatClient.Builder chatClientBuilder, ToolCallbackProvider tools) {
        return new ChatService(chatClientBuilder, tools);
    }
    @Bean
    public RestClient.Builder restClientBuilder() {
        return RestClient.builder();
    }
}
